//
//  UIButton+Helper.h
//  LZLife
//
//  Created by 214 on 2021/3/16.
//

#import <UIKit/UIKit.h>

// 定义一个枚举（包含了四种类型的button）
typedef NS_ENUM(NSUInteger, ButtonEdgeInsetsStyle) {
    ButtonEdgeInsetsStyleTop,    // image在上，label在下
    ButtonEdgeInsetsStyleLeft,   // image在左，label在右
    ButtonEdgeInsetsStyleBottom, // image在下，label在上
    ButtonEdgeInsetsStyleRight   // image在右，label在左
};

@interface UIButton (Helper)<UIAlertViewDelegate>

/// 设置button的titleLabel和imageView的布局样式及间距
- (void)layoutButtonWithEdgeInsetsStyle:(ButtonEdgeInsetsStyle)style imageTitleSpace:(CGFloat)space;

-(void)timerWithParams:(NSDictionary *)param withUrl:(NSString *)url andBock:(void(^)(NSString * str))resultBlock;

//btn文字，字体颜色，字体大小
- (void)changeBtnStringArray:(NSArray *)strArray
           colorArray:(NSArray *)colorArray
            fontArray:(NSArray *)fontArray;

+ (UIButton *)initWithButton:(CGRect)rect
                        text:(NSString *)title
                        font:(UIFont *)fontSize
                   textColor:(UIColor *)color
           selectedTextColor:(UIColor *)sColor
                   normalImg:(UIImage *)nImg
                     highImg:(UIImage *)hImg
                 selectedImg:(UIImage *)sImg;
@end

